<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>AK JOB</title>
  <meta name="renderer" content="webkit">
  <link rel="icon" type="image/x-icon" href="../../layuiadmin/style/res/favicon.png"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
</head>
<body>
<div class="layui-fluid" >
  <div class="layui-row layui-col-space15">
    <div class="layui-col-sm6 layui-col-md3">
      <div class="layui-card">
        <div class="layui-card-header">
          应用量
          <span class="layui-badge layui-bg-blue layuiadmin-badge">总</span>
        </div>
        <div class="layui-card-body layuiadmin-card-list">
          <p class="layuiadmin-big-font" data-name="applicationCount">-</p>
          <p><br/></p>
        </div>
      </div>
    </div>
    <div class="layui-col-sm6 layui-col-md3">
      <div class="layui-card">
        <div class="layui-card-header">
          任务量
          <span class="layui-badge layui-bg-blue layuiadmin-badge">总</span>
        </div>
        <div class="layui-card-body layuiadmin-card-list">
          <p class="layuiadmin-big-font" data-name="jobCount">-</p>
          <p><br/></p>
        </div>
      </div>
    </div>
    <div class="layui-col-sm6 layui-col-md3">
      <div class="layui-card">
        <div class="layui-card-header">
          调度次数
          <span class="layui-badge layui-bg-green layuiadmin-badge">年</span>
        </div>
        <div class="layui-card-body layuiadmin-card-list">
          <p class="layuiadmin-big-font" data-name="taskCount">-</p>
          <p><br/></p>
        </div>
      </div>
    </div>
    <div class="layui-col-sm6 layui-col-md3">
      <div class="layui-card">
        <div class="layui-card-header">
          成功数量
          <span class="layui-badge layui-bg-green layuiadmin-badge">年</span>
        </div>
        <div class="layui-card-body layuiadmin-card-list">
          <p class="layuiadmin-big-font" data-name="successCount">-</p>
          <p>
            成功率
            <span class="layuiadmin-span-color"><span data-name="successRate">-</span>% <i class="layui-inline layui-icon layui-icon-face-smile-b"></i></span>
          </p>
        </div>
      </div>
    </div>
  </div>
</div>
</div>
<script src="../../layuiadmin/layui/layui.js"></script>
<script>
  layui.config({
    base: '../../layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index','setter','auth','statistics'],function () {
    var setter = layui.setter;
    var statistics = layui.statistics;
    var $ = layui.$;
    statistics.methods.homeStatistics().done(function (req) {
      let homeStatistics = req.data;
      $("p[data-name=applicationCount]").text(homeStatistics.applicationCount);
      $("p[data-name=jobCount]").text(homeStatistics.jobCount);
      $("p[data-name=taskCount]").text(homeStatistics.taskCount);
      $("p[data-name=successCount]").text(homeStatistics.successCount);
      $("span[data-name=successRate]").text(homeStatistics.successRate);
    })
  });
</script>
</body>
</html>